{% extends "master.html" %}
{% from "_formhelpers.html" import render_field_in_row %}

{% block title %}Login{% endblock %}
{%block tag %}home{% endblock %}

{% block content %}
<h2>Login</h2>

<form action="{{ url_for('do_login') }}" method="POST">
  <input type="hidden" value="{{ next_url }}" name="next_url" />
  <table>
    {{ render_field_in_row(form.username) }}
    {{ render_field_in_row(form.password) }}
  </table>
  <p class="buttons indent">
    <input type="submit" class="submit positive button" value="Login">
    <a href="{{ url_for('index') }}">
      <input type="button" value="Cancel" class="button">
    </a>
    {{ form.csrf_token }}
  </p>
</form>

<p>
  If you do not have already an account: <a href="{{ url_for('new_user') }}">
  Create one!</a>
</p>

<p>
  <a href="{{ url_for('lost_password') }}">
  Forgot your password?</a>
</p>

{% endblock %}
